import {createRouter, createWebHashHistory, createWebHistory} from 'vue-router'
import {notFoundAndNoPowerRoutes, routes} from '@/router/routes.ts'
import {App} from 'vue'
import guard from '@/router/guard.ts'

const router = createRouter({
    history: createWebHistory(),
    routes: [...routes, ...notFoundAndNoPowerRoutes],
    scrollBehavior() {
        return { top: 0, behavior: 'smooth' }
    },
})
guard(router)
export function setupRouter (app:App){
     app.use(router)
}
export default router
